using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace UwinEducation.Domain.Entities
{
    /// <summary>
    /// 教室实体
    /// </summary>
    [Table("basic_classrooms")]
    public class Classroom : EntityBase
    {
        public Guid Id { get;  set; }
        /// <summary>
        /// 教室名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 教室容量
        /// </summary>
        public int Capacity { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Remarks { get; set; }

        /// <summary>
        /// 创建教室
        /// </summary>
        public static Classroom Create(string name, int capacity, string remarks = null)
        {
            return new Classroom
            {
                Id = Guid.NewGuid(),
                Name = name,
                Capacity = capacity,
                Remarks = remarks,
                CreatedAt = DateTime.Now
            };
        }
    }
}